{template game_header}

<style type="text/css">
td{text-align:center;}
</style>

<h4 style="padding-left:10px;;">
    <span>奖品列表</span>

    <span style="float:right;font-size:14px;"><i class="icon-plus-sign"></i> <a href="?c=adminGame&a=giftUpdate">添加奖品</a> &nbsp; </span>
</h4>
<form class="form-horizontal" method="post" action="?c=adminGame&a=giftInfo">
    <div class="control-group search-group" style="margin:0;">
        <label class="control-label" >奖品类型：</label>
        <select name="giftType">
            <option value="0">全部</option>
            <option {if $search['giftType'] == 1} selected="selected" {/if} value="1">实物</option>
            <option {if $search['giftType'] == 2} selected="selected" {/if} value="2">虚拟</option>
        </select>
    </div>
    <div class="control-group search-group" style="margin:0;">
        <div class="controls">
            <input type="hidden" value="search" name="s">
            <button class="btn" type="submit">搜索</button>
        </div>
    </div>
</form>

<div class="bs-docs-example table-align pt-15" style="clear:both;">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>奖品ID</th>
                <th>名称</th>
                <th>图片</th>
                <th>总数量</th>
                <th>剩余数量</th>
                <th>中奖概率</th>
                <th>奖品类型</th>
                <th>应用渠道</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {if !$list}  
                <tr>
                    <td colspan="8">暂无记录</td>              
                </tr>
            {else}

            {loop $list $k $v}
            <tr>
                <td>{$v['gid']}</td>
                <td>{$v['name']}</td>
                <td><img src="{$v['img']}"></td>
                <td>{$v['total']}</td>
                <td>{$v['remain']}</td>
                <td>{$v['chance']}%</td>
                <td>{$v['type']}</td>
                <td>{$v['channelName']}</td>
                <td>
                    <a class="btn btn-edit" href="?c=adminGame&a=giftUpdate&gid=$v['gid']">修改</a>
                </td>
            </tr>
            {/loop}

            {/if}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
{template footer}
